home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / swanson / clip.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-01-06  |  3.2 KB  |  106 lines

  1. VERSION 2.00
  2. Begin Form Algorithms 
  3.    Caption         =   "Algorithms"
  4.    ClientHeight    =   3810
  5.    ClientLeft      =   1365
  6.    ClientTop       =   1545
  7.    ClientWidth     =   7305
  8.    ClipControls    =   0   'False
  9.    Height          =   4215
  10.    Left            =   1305
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   3810
  13.    ScaleWidth      =   7305
  14.    Top             =   1200
  15.    Width           =   7425
  16.    Begin Frame Frame1 
  17.       Caption         =   "Frame1"
  18.       Height          =   1575
  19.       Left            =   240
  20.       TabIndex        =   0
  21.       Top             =   240
  22.       Width           =   5655
  23.       Begin CheckBox Check1 
  24.          Caption         =   "AutoRedraw"
  25.          Height          =   255
  26.          Left            =   240
  27.          TabIndex        =   6
  28.          Top             =   1200
  29.          Width           =   2175
  30.       End
  31.       Begin OptionButton optLineStyle 
  32.          Caption         =   "Lines using Vars"
  33.          Height          =   375
  34.          Index           =   1
  35.          Left            =   240
  36.          TabIndex        =   2
  37.          Top             =   720
  38.          Width           =   2895
  39.       End
  40.       Begin OptionButton optLineStyle 
  41.          Caption         =   "Lines using Properties"
  42.          Height          =   255
  43.          Index           =   0
  44.          Left            =   240
  45.          TabIndex        =   1
  46.          Top             =   360
  47.          Width           =   2775
  48.       End
  49.       Begin Label Label1 
  50.          Caption         =   "Label1"
  51.          Height          =   255
  52.          Left            =   240
  53.          TabIndex        =   5
  54.          Top             =   1200
  55.          Width           =   2295
  56.       End
  57.       Begin Label lblAlgorithm 
  58.          Caption         =   "00.00 secs."
  59.          Height          =   255
  60.          Index           =   1
  61.          Left            =   4080
  62.          TabIndex        =   4
  63.          Top             =   840
  64.          Width           =   1335
  65.       End
  66.       Begin Label lblAlgorithm 
  67.          AutoSize        =   -1  'True
  68.          Caption         =   "00.00 secs."
  69.          Height          =   375
  70.          Index           =   0
  71.          Left            =   4080
  72.          TabIndex        =   3
  73.          Top             =   360
  74.          Width           =   1215
  75.          WordWrap        =   -1  'True
  76.       End
  77.    End
  78. Sub Check1_Click ()
  79.     Cls
  80.     Me.AutoRedraw = Not Me.AutoRedraw
  81. End Sub
  82. Sub Form_Load ()
  83.     label1 = "AutoRedraw = " & Me.AutoRedraw
  84. End Sub
  85. Sub Form_Paint ()
  86.     Cls
  87.     If optLineStyle(0) Then
  88.         Start = Timer
  89.         For Y = 1 To Me.ScaleHeight Step 5
  90.             Line (0, (Me.ScaleHeight - Y))-(Me.ScaleWidth, (Me.ScaleHeight - Y))
  91.         Next Y
  92.         Finish = Timer
  93.         lblAlgorithm(0) = Format$(Finish - Start, "##.##") & " secs."
  94.     Else
  95.         frmWidth = Me.ScaleWidth
  96.         frmHeight = Me.ScaleHeight
  97.         Start = Timer
  98.         For Y = 1 To frmHeight Step 5
  99.             X = frmHeight - Y
  100.             Line (0, X)-(frmWidth, X)
  101.         Next Y
  102.         Finish = Timer
  103.         lblAlgorithm(1) = Format$(Finish - Start, "##.##") & " secs."
  104.     End If
  105. End Sub
  106.